//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
/******************************************************************************
**
**  COPYRIGHT (C) 2001, 2002 Intel Corporation.
**
**  This software as well as the software described in it is furnished under
**  license and may only be used or copied in accordance with the terms of the
**  license. The information in this file is furnished for informational use
**  only, is subject to change without notice, and should not be construed as
**  a commitment by Intel Corporation. Intel Corporation assumes no
**  responsibility or liability for any errors or inaccuracies that may appear
**  in this document or any software that may be provided in association with
**  this document. 
**  Except as permitted by such license, no part of this document may be 
**  reproduced, stored in a retrieval system, or transmitted in any form or by
**  any means without the express written consent of Intel Corporation. 
**
**  FILENAME:       xllp_WM8753.h
**
**  PURPOSE: contains all WM8753 specific macros, typedefs, and prototypes.
**           Declares no storage.
**                  
**
******************************************************************************/
#pragma once

#include "xllp_defs.h"
#include "xllp_i2s.h"
#include "xllp_i2c.h"
#include "xllp_ssp.h"
#include "xllp_acodec.h"




#define Wm8753_DACCONTROL				0x1
#define Wm8753_ADCCONTROL				0x2
#define Wm8753_PCMAUDIOIF				0x3
#define Wm8753_HIFIAUDIOIF				0x4
#define Wm8753_IFCONTROL				0x5
#define Wm8753_SAMPLERATECTRL1			0x6
#define Wm8753_SAMPLERATECTRL2          0x7
#define Wm8753_LDACVOLUME               0x8
#define Wm8753_RDACVOLUME               0x9
#define Wm8753_BASSCTRL                 0xa
#define Wm8753_TREBLECTRL               0xb
#define Wm8753_ALC1                     0xc
#define Wm8753_ALC2                     0xd
#define Wm8753_ALC3                     0xe
#define Wm8753_NOISEGATE                0xf
#define Wm8753_LADCVOLUME               0x10
#define Wm8753_RADCVOLUME               0x11
#define Wm8753_ADDITIONCTRL1             0x12
#define Wm8753_3DCTRL                   0x13
#define Wm8753_PM1                      0x14
#define Wm8753_PM2                      0x15
#define Wm8753_PM3                      0x16
#define Wm8753_PM4                      0x17
#define Wm8753_IDREG                    0x18
#define Wm8753_INTPOLARITY              0x19
#define Wm8753_INTENABLE                0x1a
#define Wm8753_GPIOCTRL1                0x1b
#define Wm8753_GPIOCTRL2                0x1c
#define Wm8753_RESET                    0x1f
#define Wm8753_RECORDMIX1               0x20
#define Wm8753_RECORDMIX2               0x21 
#define Wm8753_LOUTMIX1                 0x22
#define Wm8753_LOUTMIX2                 0x23  
#define Wm8753_ROUTMIX1                 0x24
#define Wm8753_ROUTMIX2                 0x25
#define Wm8753_MOUTMIX1                 0x26
#define Wm8753_MOUTMIX2                 0x27
#define Wm8753_LOUT1VOL                 0x28
#define Wm8753_ROUT1VOL                 0x29
#define Wm8753_LOUT2VOL                 0x2a
#define Wm8753_ROUT2VOL                 0x2b
#define Wm8753_MONOOUTVOL               0x2c
#define Wm8753_OUTPUTCTRL               0x2d
#define Wm8753_ADCINPUTMODE             0x2e
#define Wm8753_INPUTCTRL1               0x2f
#define Wm8753_INPUTCTRL2               0x30
#define Wm8753_LINPUTVOL                0x31
#define Wm8753_RINPUTVOL                0x32
#define Wm8753_MICBIASCTRL              0x33
#define Wm8753_CLOCKCTRL                0x34
#define Wm8753_PLL1CTRL1                0x35
#define Wm8753_PLL1CTRL2                0x36
#define Wm8753_PLL1CTRL3                0x37
#define Wm8753_PLL1CTRL4                0x38
#define Wm8753_PLL2CTRL1                0x39
#define Wm8753_PLL2CTRL2                0x3a
#define Wm8753_PLL2CTRL3                0x3b
#define Wm8753_PLL2CTRL4                0x3c
#define Wm8753_BIASCTRL                 0x3d
#define Wm8753_ADDITIONCTRL2            0x3f

extern XLLP_ACODEC_ERROR_T XllpWm8753SetMasterVol(XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT16_T GainInDb);
extern XLLP_ACODEC_ERROR_T XllpWm8753GetInSampleRate(XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT16_T * RateInKhz);
extern XLLP_ACODEC_ERROR_T XllpWm8753GetOutSampleRate (XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT16_T * RateInKhz);
extern XLLP_ACODEC_ERROR_T XllpWm8753SetInSampleRate(XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT16_T RateInKhz);
extern XLLP_ACODEC_ERROR_T XllpWm8753SetOutSampleRate (XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT16_T RateInKhz);
extern XLLP_ACODEC_ERROR_T XllpWm8753EnableSspPath (XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT8_T uiDirection);
extern XLLP_ACODEC_ERROR_T XllpWm8753DisableSspPath (XLLP_ACODEC_CONTEXT_T *pDeviceContext,XLLP_UINT8_T uiDirection);
extern XLLP_ACODEC_ERROR_T XllpWm8753CodecSpecificInit (XLLP_ACODEC_CONTEXT_T *pDeviceContext);
extern XLLP_ACODEC_ERROR_T XllpWm8753CodecWrite(XLLP_ACODEC_CONTEXT_T *pDeviceContext, XLLP_UINT16_T regOffset, XLLP_UINT16_T regVal);
extern XLLP_ACODEC_ERROR_T XllpWm8753CodecRead(XLLP_ACODEC_CONTEXT_T *pDeviceContext, XLLP_UINT16_T regOffset, XLLP_UINT16_T *regVal);
extern XLLP_ACODEC_ERROR_T XllpWm8753CodecSpecificDeinit(XLLP_ACODEC_CONTEXT_T *pDeviceContext);
extern XLLP_ACODEC_ERROR_T XllpWm8753EnterEuipmentState(XLLP_ACODEC_CONTEXT_T *pDeviceContext, XLLP_ACODEC_EQUIPMENT_T State);
extern XLLP_ACODEC_ERROR_T XllpWm8753QueryEquipmentState(XLLP_ACODEC_CONTEXT_T *pDeviceContext, XLLP_ACODEC_EQUIPMENT_T * State);
                 